package com.recycle.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.recycle.system.mapper.WasteResourceTypeMapper;
import com.recycle.system.domain.WasteResourceType;
import com.recycle.system.service.IWasteResourceTypeService;

/**
 * 资源类型Service业务层处理
 *
 * @author recycle
 * @date 2023-03-11
 */
@Service
public class WasteResourceTypeServiceImpl implements IWasteResourceTypeService
{
    @Autowired
    private WasteResourceTypeMapper wasteResourceTypeMapper;

    /**
     * 查询资源类型
     *
     * @param resourceTypeId 资源类型主键
     * @return 资源类型
     */
    @Override
    public WasteResourceType selectWasteResourceTypeByResourceTypeId(Long resourceTypeId)
    {
        return wasteResourceTypeMapper.selectWasteResourceTypeByResourceTypeId(resourceTypeId);
    }

    /**
     * 查询资源类型列表
     *
     * @param wasteResourceType 资源类型
     * @return 资源类型
     */
    @Override
    public List<WasteResourceType> selectWasteResourceTypeList(WasteResourceType wasteResourceType)
    {
        return wasteResourceTypeMapper.selectWasteResourceTypeList(wasteResourceType);
    }

    /**
     * 新增资源类型
     *
     * @param wasteResourceType 资源类型
     * @return 结果
     */
    @Override
    public int insertWasteResourceType(WasteResourceType wasteResourceType)
    {
        return wasteResourceTypeMapper.insertWasteResourceType(wasteResourceType);
    }

    /**
     * 修改资源类型
     *
     * @param wasteResourceType 资源类型
     * @return 结果
     */
    @Override
    public int updateWasteResourceType(WasteResourceType wasteResourceType)
    {
        return wasteResourceTypeMapper.updateWasteResourceType(wasteResourceType);
    }

    /**
     * 批量删除资源类型
     *
     * @param resourceTypeIds 需要删除的资源类型主键
     * @return 结果
     */
    @Override
    public int deleteWasteResourceTypeByResourceTypeIds(Long[] resourceTypeIds)
    {
        return wasteResourceTypeMapper.deleteWasteResourceTypeByResourceTypeIds(resourceTypeIds);
    }

    /**
     * 删除资源类型信息
     *
     * @param resourceTypeId 资源类型主键
     * @return 结果
     */
    @Override
    public int deleteWasteResourceTypeByResourceTypeId(Long resourceTypeId)
    {
        return wasteResourceTypeMapper.deleteWasteResourceTypeByResourceTypeId(resourceTypeId);
    }
}
